package com.gxa.modules.datamanagement.controller;

import com.gxa.common.utils.Result;
import com.gxa.modules.datamanagement.entity.Regions;
import com.gxa.modules.datamanagement.service.RegionsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "所属地区接口")
@RestController
@Slf4j
public class RegionController {
    @Autowired
    private RegionsService regionsService;

    @ApiOperation(value="所属地区查询接口")
    @GetMapping("/regions/list")
    public Result<List<Regions>> list01(){
        log.info("-------------");
        List<Regions> regions=this.regionsService.list();
        return new Result<List<Regions>>().ok(regions);
    }
}
